unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,NativeXmlObjectStorage;

type
  TDEMO=class(TCollectionItem)
  public
    FValue:Extended;
  published
    property Value:Extended read FValue write FValue;
  end;
  TForm1 = class(TForm)
    Btnx_1: TButton;
    procedure Btnx_1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses
  Class_KzUtils;

{$R *.dfm}

procedure TForm1.Btnx_1Click(Sender: TObject);
var
  List:TCollection;
  Demo:TDEMO;
begin
  try
    List:=TCollection.Create(TDEMO);
    Demo:=TDEMO(List.Add);
    Demo.Value:=-8989.4111231;
    Demo:=TDEMO(List.Add);
    Demo.Value:=-8989.001;
    Demo:=TDEMO(List.Add);
    Demo.Value:=-8989.8054;

    NativeXmlObjectStorage.ObjectSaveToXmlFile(List,TKzUtils.ExePath+'demo.xml');       
  finally
    TKzUtils.TryFreeAndNil(List);
  end;
end;

end.
 